userName="test35"
password="123456"
from selenium import webdriver

dr=webdriver.Firefox()
dr.implicitly_wait(20)
dr.get("http://localhost/dbshop/")
dr.find_element_by_link_text("登录").click()
dr.find_element_by_id("user_name").send_keys(userName)
dr.find_element_by_id("user_password").send_keys(password)
dr.find_element_by_xpath('//button').click()